The software industry is now undergoing a profound transformation due to the appearance of SaaS (Software as a Service). In many countries, SaaS is already popular and widely used. With rapidly changing security techniques of SaaS, more and more enterprises come to accept the security and reliability of SaaS. Based on the Internet characteristics, SaaS software has many unique features over previous-generation software, and many new techniques have emerged among server software, databases, data transmission, and client browsers.
Development of each SaaS software system is based on multi-tenancy. That is, a set of software and database platforms is simultaneously used by multiple enterprises (or multiple tenants in an enterprise) through techniques such as software and database isolation and confidentiality. Although non-multi-tenant SaaS products are not necessarily “fake SaaS” products, multi-tenancy greatly increases the operation efficiency and stability, reduces the maintenance and upgrading cost for operators and finally gives implicit price benefits to customers.
In a SaaS system, how to handle access of multiple tenants to a database is a tougher challenge compared with application computational logic/level, and how to meet different demands of tenants on database table extension is a fundamental one among problems concerning “access of multiple tenants to a database.” For example, assume there is a basic information statistical Table I in a certain SaaS employee information system. In Table I, Tenant A needs to record an employee code of each employee for identifying employees, while Tenant B does not need to record an employee code of each employee but identifies its employees by home addresses. A problem occurs when designing data tables for this employee information system, because it is hard to predict which demands will be imposed by future tenants on this database table.
There are some known techniques for extending database tables in a multi-tenant environment. According to one solution, in designing a multi-tenant SaaS application system, database table columns which allow extension by tenants according to their different demands may be defined for each database table. In the above described example, it is possible to define an extensible blank table column in Table I when designing the employee information system. Hence, Tenant A may select this blank table column as the “employee code” column, while Tenant B may select this blank table column as the “employee home address” column. In this manner, tenants may define the predefined extensible blank table column as a desired table column according to their own demands, and further complete database operations such as data input and query. However, this solution has a distinct disadvantage in that if developers provide only a few extensible blank table columns during system design, it might be impossible to satisfy demands of all tenants for database table extension. On the other hand, if system developers provide a large number of extensible blank table columns, the database table will occupy and waste a large space, because many extensible table columns might be required by only several tenants. What is worse, both these two disadvantages may be present in some cases, i.e., some tenants' demand cannot be satisfied and the low efficiency of many extensible table columns wastes too much space. Another disadvantage of this solution lies in that the data may be correctly explained merely by use of joint operation, since the predefined extensible blank table column does not contain data type and other relevant information (e.g., numeric type, date type, string type), and the information must be defined by tenants themselves. This will consume a mass of computational resources and further affects the system performance and user experience. In addition, such a solution requires developers of a multi-tenant application system to have a sufficient understanding of tenant demands, which increases the burden on the system developers.
According to another known solution, private data (data table columns to be extended) is stored for each tenant by creating a private table. This solution has several obvious disadvantages. Firstly, many private tables would need to be created in a multi-tenant system in order to satisfy the demand of unknown tenants, and the number of private tables that can be created is limited by a database management system DBMS. Moreover, the operation of a tenant on created private data (data in an extensible table column) is entirely dependent on the joint operation between a private table and a public table. This will consume a large amount of computational resource and further affect the system performance and user experience.